package com.mgr.service;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.easetech.easytest.annotation.DataLoader;
import org.easetech.easytest.runner.SpringTestRunner;
import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.transaction.annotation.Transactional;

import java.util.MissingResourceException;
import java.util.ResourceBundle;

import org.junit.runner.RunWith;

/**
 * Base class for running DAO tests.
 * 
 * @author <a href="mailto:matt@raibledesigns.com">Matt Raible</a>
 * @author jgarcia (updated: migrate to hibernate 4; moved from compass-search
 *         to hibernate-search
 * @version $Revision: 1.0 $
 */
@RunWith(SpringJUnit4ClassRunner.class)
//@RunWith(SpringTestRunner.class)
@ContextConfiguration(locations = { "classpath:test/spring-servlet.xml" })
@Transactional
// @DataLoader(filePaths = { "CustomerServiceTestData.csv" })
public abstract class BaseServiceTestCase {
	@Autowired
	private SessionFactory session;

	/**
	 * Log variable for all child classes. Uses LogFactory.getLog(getClass())
	 * from Commons Logging
	 */
	protected final Log log = LogFactory.getLog(getClass());
	
}
